package com.jgp.workflow.utils;

import com.jgp.security.secmodel.SecInstitution;
import com.jgp.security.secmodel.SecRole;
import com.jgp.security.secmodel.SecUser;
import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.activiti.engine.impl.persistence.entity.UserEntity;

import java.util.List;

/**
 * 项目   jgp-cloud-parent
 * 作者   loufei
 * 时间   2019/1/29
 */
public class IdentityUtil {
    public static User toActivityUser(SecUser user){
        User userEntity=new UserEntity();
        userEntity.setId(user.getUsername());
        userEntity.setFirstName(user.getRealName());
        userEntity.setLastName(user.getRealName());
        userEntity.setPassword(user.getPassword());
        return userEntity;
    }
    public static List<Group> roleToActivityGroup(List<SecRole> roles){
        return null;
    }
    
    public static List<Group> orgToActivityGroup(List<SecInstitution> orgs){
        return null;
    }
}
